<html>
<head><meta charset="utf-8"><title>dyn and impl trait support chalk#218 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html">dyn and impl trait support chalk#218</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164783290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164783290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164783290">(May 03 2019 at 10:26)</a>:</h4>
<p>starting this thread here for the work on <a href="https://github.com/rust-lang/chalk/issues/218" target="_blank" title="https://github.com/rust-lang/chalk/issues/218">https://github.com/rust-lang/chalk/issues/218</a></p>



<a name="164783697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164783697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164783697">(May 03 2019 at 10:35)</a>:</h4>
<p>first things first, where is the specification for dyn and impl trait?</p>



<a name="164783701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164783701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164783701">(May 03 2019 at 10:35)</a>:</h4>
<p>i'd like to know which positions we're supposed to support this new syntax</p>



<a name="164787543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164787543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164787543">(May 03 2019 at 11:51)</a>:</h4>
<p>(deleted)</p>



<a name="164789036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164789036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164789036">(May 03 2019 at 12:18)</a>:</h4>
<p>forget about the questions, i'm answering them myself</p>



<a name="164815352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164815352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164815352">(May 03 2019 at 17:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> In the issue, you said that the chalk parser should create new <code>Ty</code> enum variants with a field containing <code>Vec&lt;InlineBound&gt;</code>, but in the chalk IR, you have <code>Vec&lt;QuantifiedWhereClause&gt;</code> instead. Which one should be the correct one to use?</p>



<a name="164817593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164817593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164817593">(May 03 2019 at 18:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> nice</p>



<a name="164817601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164817601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164817601">(May 03 2019 at 18:21)</a>:</h4>
<p>mmm let me see</p>



<a name="164817732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164817732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164817732">(May 03 2019 at 18:22)</a>:</h4>
<p>as far i can see, the difference between them is whether it supports the "forall" syntax or not</p>



<a name="164817980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164817980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164817980">(May 03 2019 at 18:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> ah. We do want that.</p>



<a name="164817989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164817989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164817989">(May 03 2019 at 18:25)</a>:</h4>
<p>In other words, these are legal types. <code>dyn for&lt;'a&gt; Output&lt;'a&gt;</code></p>



<a name="164818000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164818000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164818000">(May 03 2019 at 18:25)</a>:</h4>
<p><code>impl for&lt;'a&gt; Output&lt;'a&gt;</code> :)</p>



<a name="164818338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164818338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164818338">(May 03 2019 at 18:29)</a>:</h4>
<p>gotcha, so we should use <code>QuantifiedWhereClause</code> instead</p>



<a name="164818365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164818365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164818365">(May 03 2019 at 18:29)</a>:</h4>
<p>or wait, what's the difference between <code>QuantifiedWhereClause</code> and <code>QuantifiedInlineBound</code>?</p>



<a name="164818629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164818629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164818629">(May 03 2019 at 18:32)</a>:</h4>
<p>it <em>looks</em> to me the better one is <code>QuantifiedInlineBound</code> instead</p>



<a name="164818781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164818781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164818781">(May 03 2019 at 18:34)</a>:</h4>
<blockquote>
<p>it <em>looks</em> to me the better one is <code>QuantifiedInlineBound</code> instead</p>
</blockquote>
<p>correct</p>



<a name="164825887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164825887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164825887">(May 03 2019 at 20:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> a suggestion from <span class="user-mention" data-user-id="116009">@nikomatsakis</span> was to get rid of <code>QuantifiedInlineBound</code> and instead have <code>Binder&lt;QuantifiedWhereClause&gt;</code> where the binder would bind an existential <code>^Self</code>. It would be cool if we were able to do that, but I remember having tried and it was not as easy at it sounded</p>



<a name="164826881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164826881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164826881">(May 03 2019 at 20:21)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> I think I meant to do it in the lowering, not necessarily in the AST</p>



<a name="164826892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164826892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164826892">(May 03 2019 at 20:21)</a>:</h4>
<p>i.e., in chalk-ir</p>



<a name="164826902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164826902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164826902">(May 03 2019 at 20:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes</p>



<a name="164827015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164827015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164827015">(May 03 2019 at 20:22)</a>:</h4>
<p>Ah ok we’re still only talking about syntax</p>



<a name="164827083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164827083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164827083">(May 03 2019 at 20:23)</a>:</h4>
<p>Still good to keep this in mind for when we proceed onto implementing dyn traits lowering :)</p>



<a name="164867692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867692">(May 04 2019 at 13:14)</a>:</h4>
<p>hmm, looks like i still need some clarification on how "forall" is supported</p>



<a name="164867717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867717">(May 04 2019 at 13:15)</a>:</h4>
<p>given we have <code>impl for&lt;'a&gt; Foo&lt;'a&gt;</code>, is this supposed to work? <code>impl for&lt;'a&gt; Foo&lt;'a&gt; + Bar&lt;'a&gt;</code></p>



<a name="164867769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867769">(May 04 2019 at 13:16)</a>:</h4>
<p>or is it supposed to be something like <code>impl for&lt;'a&gt; Foo&lt;'a&gt; + for&lt;'b&gt; Bar&lt;'b&gt;</code></p>



<a name="164867786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867786">(May 04 2019 at 13:16)</a>:</h4>
<p>i'm inclined to believe that the former is the version of quantified types that we'd like to support, and if so, then the grammar is a bit different and I'll need to account for it</p>



<a name="164867876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867876">(May 04 2019 at 13:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> <code>impl dyn for&lt;'a&gt; Foo&lt;'a&gt; + for&lt;'b&gt; Bar&lt;'b&gt; { ... }</code>makes things easier to understand <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="164867948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164867948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164867948">(May 04 2019 at 13:20)</a>:</h4>
<p>i'm not talking about the difficulty of understanding it, i want to know what exactly we'd like to support</p>



<a name="164868060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164868060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164868060">(May 04 2019 at 13:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span>  we don't allow 1) <code>for&lt;'a&gt; (Foo&lt;'a&gt; + Bar&lt;'a&gt;)</code> in Rust atm. However, using 2) <code>∀ x. [P(x) ∧ Q(x)] ≡ [∀ x. P(x)] ∧ [∀ x. Q(x)]</code> you get 3) <code>(for&lt;'a&gt; Foo&lt;'a&gt;) + (for&lt;'a&gt; Bar&lt;'a&gt;)</code> which is equivalent to 1)</p>



<a name="164868135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164868135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164868135">(May 04 2019 at 13:25)</a>:</h4>
<p>ok, so the latter is what we'd like to have instead</p>



<a name="164868161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164868161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164868161">(May 04 2019 at 13:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> yeah we need to support:<br>
1) <code>dyn (for&lt;'a&gt; Foo&lt;'a&gt;) + (for&lt;'a&gt; Bar&lt;'a&gt;)</code><br>
2) <code>impl (for&lt;'a&gt; Foo&lt;'a&gt;) + (for&lt;'a&gt; Bar&lt;'a&gt;)</code><br>
3) <code>T: (for&lt;'a&gt; Foo&lt;'a&gt;) + (for&lt;'a&gt; Bar&lt;'a&gt;)</code></p>



<a name="164868207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164868207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164868207">(May 04 2019 at 13:26)</a>:</h4>
<p>since rustc does</p>



<a name="164870022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870022">(May 04 2019 at 14:15)</a>:</h4>
<p>so, i found quite a lot of convenience traits and methods that allow me to lower AST types into chalk IR types</p>



<a name="164870229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870229">(May 04 2019 at 14:20)</a>:</h4>
<p>first, let's be clear about what we want to lower: <code>ast::Ty::Dyn(Vec&lt;QuantifiedInlineBound&gt;)</code> into <code>chalk_ir::Ty::Dyn(Vec&lt;QuantifiedWhereClause&gt;)</code></p>



<a name="164870230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870230">(May 04 2019 at 14:20)</a>:</h4>
<p>there's already a <code>LowerQuantifiedInlineBound</code> trait which provides me with a method to lower the <code>Vec&lt;ast::QuantifiedInlineBound&gt;</code> into a <code>Vec&lt;rust_ir::QuantifiedInlineBound&gt;</code></p>



<a name="164870231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870231">(May 04 2019 at 14:20)</a>:</h4>
<p>what's left then is to convert that result into a <code>Vec&lt;chalk_ir::QuantifiedWhereClause&gt;</code>, which the <code>IntoWhereClauses</code> trait also provides me convenience methods for</p>



<a name="164870233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870233">(May 04 2019 at 14:20)</a>:</h4>
<p>the problem here now is that <code>into_where_clauses</code> accepts an additional <code>self_ty</code> parameter, and I'm trying to figure out what to put there</p>



<a name="164870297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870297">(May 04 2019 at 14:22)</a>:</h4>
<p>my educated guess is <code>chalk_ir::Ty::BoundVar(binders.len())</code> where <code>binders</code> is the binders for each <code>QuantifiedInlineBound</code> in the vector, because that's the de Bruijn index that describes the anonymous self type that an <code>impl/dyn Trait</code> has</p>



<a name="164870299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164870299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164870299">(May 04 2019 at 14:22)</a>:</h4>
<p>can somebody confirm that this is the case?</p>



<a name="164876450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164876450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164876450">(May 04 2019 at 16:31)</a>:</h4>
<blockquote>
<p>Note that these types introduce a level of binder -- this is so that you can represent the (unknown) Self type with a debruijn variable. i.e., something like dyn Foo&lt;Bar&gt; would wind up represented as</p>
<p>Dyn(^0: Foo&lt;Bar&gt;`)</p>
<p>where ^0 represents "debruijn variable with depth 0.</p>
</blockquote>



<a name="164876461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164876461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164876461">(May 04 2019 at 16:31)</a>:</h4>
<p>niko already answered this on the issue</p>



<a name="164876524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164876524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164876524">(May 04 2019 at 16:32)</a>:</h4>
<p>at this point then, i'm onto extending <code>chalk-solve</code>, but as niko said in the issue, it's blocked on <a href="https://github.com/rust-lang-nursery/chalk/issues/216" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/216">chalk#216</a></p>



<a name="164876550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164876550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164876550">(May 04 2019 at 16:33)</a>:</h4>
<p>oh? it just got merged yesterday</p>



<a name="164906327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164906327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164906327">(May 05 2019 at 07:04)</a>:</h4>
<blockquote>
<p>error[E0004]: non-exhaustive patterns: <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 11 more not covered<br>
   --&gt; chalk-solve\src\infer\unify.rs:107:15<br>
    |<br>
107 |         match (a, b) {<br>
    |               ^^^^^^ patterns <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 11 more not covered</p>
<p>error[E0004]: non-exhaustive patterns: <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 9 more not covered<br>
   --&gt; chalk-solve\src\solve\slg.rs:364:15<br>
    |<br>
364 |         match (new, current) {<br>
    |               ^^^^^^^^^^^^^^ patterns <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 9 more not covered</p>
<p>error[E0004]: non-exhaustive patterns: <code>(&amp;Dyn(_), _)</code> and <code>(&amp;Opaque(_), _)</code> not covered<br>
   --&gt; chalk-solve\src\solve\slg\aggregate.rs:171:15<br>
    |<br>
171 |         match (ty0, ty1) {<br>
    |               ^^^^^^^^^^ patterns <code>(&amp;Dyn(_), _)</code> and <code>(&amp;Opaque(_), _)</code> not covered</p>
<p>error[E0004]: non-exhaustive patterns: <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 11 more not covered<br>
   --&gt; chalk-solve\src\solve\slg\resolvent.rs:340:15<br>
    |<br>
340 |         match (answer, pending) {<br>
    |               ^^^^^^^^^^^^^^^^^ patterns <code>(&amp;Dyn(_), &amp;Apply(_))</code>, <code>(&amp;Opaque(_), &amp;Apply(_))</code>, <code>(&amp;Dyn(_), &amp;Dyn(_))</code> and 11 more not covered</p>
<p>error[E0004]: non-exhaustive patterns: <code>&amp;Dyn(_)</code> and <code>&amp;Opaque(_)</code> not covered<br>
  --&gt; chalk-solve\src\wf.rs:56:15<br>
   |<br>
56 |         match self {<br>
   |               ^^^^ patterns <code>&amp;Dyn(_)</code> and <code>&amp;Opaque(_)</code> not covered</p>
<p>error: aborting due to 5 previous errors</p>
</blockquote>



<a name="164906344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164906344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164906344">(May 05 2019 at 07:05)</a>:</h4>
<p>these are the remaining compile time errors that i have to solve</p>



<a name="164999567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/164999567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#164999567">(May 06 2019 at 17:08)</a>:</h4>
<p>seems like you're making good progress :)</p>



<a name="165001501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165001501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165001501">(May 06 2019 at 17:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I actually do need some help on <code>chalk-solve</code>, precisely because I'm not sure how the general direction should look like</p>



<a name="165001600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165001600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165001600">(May 06 2019 at 17:32)</a>:</h4>
<p>the compiler errors give me a hint, but i don't think it's enough for my theoretical understanding of how a goal with a <code>impl/dyn trait</code> should be solved</p>



<a name="165001699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165001699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165001699">(May 06 2019 at 17:33)</a>:</h4>
<p>let me try and see what components of the solver needs work... <code>unify</code>, <code>slg</code>, <code>aggregate</code>, <code>resolvent</code> and <code>wf</code></p>



<a name="165002014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165002014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165002014">(May 06 2019 at 17:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> is there a PR?</p>



<a name="165002021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165002021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165002021">(May 06 2019 at 17:37)</a>:</h4>
<p>maybe you can leave pointers into places that you have questions?</p>



<a name="165004039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165004039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165004039">(May 06 2019 at 18:02)</a>:</h4>
<p>no there isn't yet; i'll make one this evening when i get back home</p>



<a name="165140851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165140851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165140851">(May 08 2019 at 07:16)</a>:</h4>
<p>here's a PR <a href="https://github.com/rust-lang/chalk/pull/226" target="_blank" title="https://github.com/rust-lang/chalk/pull/226">https://github.com/rust-lang/chalk/pull/226</a></p>



<a name="165140865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/165140865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#165140865">(May 08 2019 at 07:16)</a>:</h4>
<p>it's still not ready yet; i'll need some eyes here to ensure everything's fiine</p>



<a name="166106118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/166106118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#166106118">(May 20 2019 at 18:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so i'm really not sure what I should do for the chalk solver in order to support <code>dyn Trait</code> and <code>impl Trait</code>, there are no mentoring instructions written up for this and going by the compiler errors doesn't really tell me what each module is doing</p>



<a name="166753543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/166753543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#166753543">(May 28 2019 at 19:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> ok, I'll try to give you some feedback on this this week</p>



<a name="167227610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/167227610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#167227610">(Jun 03 2019 at 20:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I saw that you've left review comments on the draft PR i created, however I'd still need some guidance on how we should support dyn and impl Trait on the solver</p>



<a name="176410235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410235">(Sep 23 2019 at 21:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> ping <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> -- sorry for the big hiatus, you still interested in maintaining the PR?</p>



<a name="176410243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410243">(Sep 23 2019 at 21:13)</a>:</h4>
<p>I'm going to leave some comments today, so let me know</p>



<a name="176410254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410254">(Sep 23 2019 at 21:13)</a>:</h4>
<p>(else I can find someone else to adopt, or adopt myself)</p>



<a name="176410333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410333">(Sep 23 2019 at 21:14)</a>:</h4>
<p>sure, i still have some time nowadays for it</p>



<a name="176410360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410360">(Sep 23 2019 at 21:15)</a>:</h4>
<p>i think i just need  to understand how the solver works</p>



<a name="176410483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410483">(Sep 23 2019 at 21:16)</a>:</h4>
<p>OK</p>



<a name="176410487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410487">(Sep 23 2019 at 21:16)</a>:</h4>
<p>actually you don't</p>



<a name="176410512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410512">(Sep 23 2019 at 21:16)</a>:</h4>
<p>that is, I think all the required changes are "outside" the 'core solver'</p>



<a name="176410519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410519">(Sep 23 2019 at 21:16)</a>:</h4>
<p>I guess it depends on what you mean by "the solver"</p>



<a name="176410546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176410546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176410546">(Sep 23 2019 at 21:17)</a>:</h4>
<p>anyway let me write a comment up</p>



<a name="176412981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176412981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176412981">(Sep 23 2019 at 21:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> <a href="https://github.com/rust-lang/chalk/issues/218#issuecomment-534299093" target="_blank" title="https://github.com/rust-lang/chalk/issues/218#issuecomment-534299093">wrote a comment here</a> -- not sure if it's gonna be a bit too opaque to make sense to you, so feel free to drop questions (probably here is better, but if you put them on GH, just make sure to <code>@</code> me)</p>



<a name="176413469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176413469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176413469">(Sep 23 2019 at 21:58)</a>:</h4>
<p>ok, will read it when i find the time</p>



<a name="176417087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176417087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176417087">(Sep 23 2019 at 22:55)</a>:</h4>
<p>so, aside from <code>clauses.rs</code> in the solver that I have to update, there is also <code>wf.rs</code>, <code>resolvent.rs</code>, <code>env_elaborator.rs</code>, <code>unify.rs</code> and <code>aggregate.rs</code> that requires me to handle the additional <code>Ty::Dyn</code> and <code>Ty::Opaque</code> cases</p>



<a name="176417109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176417109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176417109">(Sep 23 2019 at 22:56)</a>:</h4>
<p>i'll also need to know what these files in the solver do in order to know how to handle them appropriately</p>



<a name="176559580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176559580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176559580">(Sep 25 2019 at 12:39)</a>:</h4>
<p>OK, I plan to put more time into traits stuff on Friday, so I can leave further instructions then. Ping me <span class="user-mention" data-user-id="116108">@Keith Yeung</span> if you have any questions on the stuff so far, or you get done early -- if I get some spare cycles i'll try to leave some more notes.</p>



<a name="176953619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176953619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176953619">(Sep 30 2019 at 17:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Ok, I just pushed a commit that extends <code>clauses.rs</code> to generate additional program clauses for impl and dyn Trait</p>



<a name="176954327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176954327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176954327">(Sep 30 2019 at 17:34)</a>:</h4>
<p>cool</p>



<a name="176954400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176954400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176954400">(Sep 30 2019 at 17:35)</a>:</h4>
<p>now we just need to fix the remaining files where we need to handle the additional variants for impl and  dyn Trait</p>



<a name="176956423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176956423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176956423">(Sep 30 2019 at 17:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> <a href="https://github.com/rust-lang/chalk/pull/226/commits/30d8323925e902d1ff41a3d413608a7173a1d266#r329709140" target="_blank" title="https://github.com/rust-lang/chalk/pull/226/commits/30d8323925e902d1ff41a3d413608a7173a1d266#r329709140">take a look at this comment</a> -- does it make sense to you?</p>



<a name="176959378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176959378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176959378">(Sep 30 2019 at 18:25)</a>:</h4>
<p>ah, so it looks like that  i was generating the wrong clauses</p>



<a name="176959428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176959428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176959428">(Sep 30 2019 at 18:26)</a>:</h4>
<p>i thought  we wanted an implication</p>



<a name="176959471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176959471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176959471">(Sep 30 2019 at 18:26)</a>:</h4>
<p>i'm not exactly understanding what the binders do</p>



<a name="176963574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963574">(Sep 30 2019 at 19:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> in general?</p>



<a name="176963578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963578">(Sep 30 2019 at 19:10)</a>:</h4>
<p>or in this specific case?</p>



<a name="176963603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963603">(Sep 30 2019 at 19:10)</a>:</h4>
<p>Both I suppose</p>



<a name="176963620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963620">(Sep 30 2019 at 19:11)</a>:</h4>
<p>are you familiar with debruijn indices?</p>



<a name="176963640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963640">(Sep 30 2019 at 19:11)</a>:</h4>
<p>(they're just a representation technique, but it's relevant here)</p>



<a name="176963659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963659">(Sep 30 2019 at 19:11)</a>:</h4>
<p>at a high-level, a <code>Binder&lt;T&gt;</code> represents some kind of, well, <em>binder</em> -- i.e., it creates a variable, but the purpose of that variable depends on the surrounding context</p>



<a name="176963672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963672">(Sep 30 2019 at 19:11)</a>:</h4>
<p>e.g., if you have a chalk goal like <code>forall&lt;T&gt; { Implemented(T: Trait) }</code></p>



<a name="176963743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963743">(Sep 30 2019 at 19:12)</a>:</h4>
<p>that <code>&lt;T&gt; { ... }</code> (without the <code>forall</code>) is represented using a <code>Binder</code></p>



<a name="176963772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176963772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176963772">(Sep 30 2019 at 19:12)</a>:</h4>
<p>the <code>Binder</code> itself is embedded in a context that indicates whether it's a <code>forall</code>, <code>exists</code>, or something else</p>



<a name="176969126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176969126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176969126">(Sep 30 2019 at 20:09)</a>:</h4>
<p>does that help, <span class="user-mention" data-user-id="116108">@Keith Yeung</span> ?</p>



<a name="176983292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176983292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176983292">(Sep 30 2019 at 23:15)</a>:</h4>
<p>sorry, was away for a while</p>



<a name="176983360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176983360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176983360">(Sep 30 2019 at 23:16)</a>:</h4>
<p>so in that comment, you said that we should call <code>Subst::apply</code>, and that would mean that we're filling in the variables in  the binder by giving it  the appropriate context?</p>



<a name="176985816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985816">(Oct 01 2019 at 00:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> right.</p>



<a name="176985822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985822">(Oct 01 2019 at 00:00)</a>:</h4>
<p>And in this case, we're storing a type like <code>dyn Foo</code> as (kind of) <code>dyn&lt;X&gt; { X: Foo }</code></p>



<a name="176985833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985833">(Oct 01 2019 at 00:01)</a>:</h4>
<p>and so we are substituting here the <code>dyn Foo</code> type itself for <code>X</code> to get our final clauses:</p>



<a name="176985836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985836">(Oct 01 2019 at 00:01)</a>:</h4>
<p><code>dyn Foo: Foo</code></p>



<a name="176985901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985901">(Oct 01 2019 at 00:02)</a>:</h4>
<p>ok, so i just force-pushed an amended commit that should resolve the comment you made</p>



<a name="176985917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176985917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176985917">(Oct 01 2019 at 00:02)</a>:</h4>
<p>there is another place in the <code>clauses.rs</code> file where i have to handle <code>Ty::Opaque | Ty::Dyn</code>, and it's in <code>match_ty</code></p>



<a name="176986005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986005">(Oct 01 2019 at 00:04)</a>:</h4>
<p>(i'm also wondering if I should just create a new method called <code>instantiate</code> on <code>Binder</code> altogether...)</p>



<a name="176986129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986129">(Oct 01 2019 at 00:07)</a>:</h4>
<p>yeah, seems good -- I like operating on the bindder itself, I don't like accessing the <code>value</code> field directly</p>



<a name="176986193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986193">(Oct 01 2019 at 00:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> I'd call it <code>substitute</code>, perhaps</p>



<a name="176986197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986197">(Oct 01 2019 at 00:08)</a>:</h4>
<p>I feel like there used to be such a method but it was removed for being unused</p>



<a name="176986210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986210">(Oct 01 2019 at 00:08)</a>:</h4>
<p>bsaically the same as this existing method, for a <code>Binders&lt;T: Fold&gt;</code>:</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">QuantifiedTy</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">substitute</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">parameters</span>: <span class="kp">&amp;</span><span class="p">[</span><span class="n">Parameter</span><span class="p">])</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">assert_eq</span><span class="o">!</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">num_binders</span><span class="p">,</span><span class="w"> </span><span class="n">parameters</span><span class="p">.</span><span class="n">len</span><span class="p">());</span><span class="w"></span>
<span class="w">        </span><span class="n">Subst</span>::<span class="n">apply</span><span class="p">(</span><span class="n">parameters</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="bp">self</span><span class="p">.</span><span class="n">ty</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="176986226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176986226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176986226">(Oct 01 2019 at 00:09)</a>:</h4>
<p>(really, <code>QuantifiedTy</code> is just a "specialized" form of binders)</p>



<a name="176989048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/176989048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#176989048">(Oct 01 2019 at 01:04)</a>:</h4>
<p>are program clauses "facts" that you provide to the datafrog engine btw?</p>



<a name="177271649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177271649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177271649">(Oct 03 2019 at 18:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I think we're awaiting for your review and next steps after  implementing the logic for generating program  clauses in the solver</p>



<a name="177271868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177271868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177271868">(Oct 03 2019 at 18:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> yep, on my list for tomorrow!</p>



<a name="177271881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177271881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177271881">(Oct 03 2019 at 18:21)</a>:</h4>
<p>or maybe later today if I get lucky :)</p>



<a name="177366078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177366078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177366078">(Oct 04 2019 at 18:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> <a href="https://github.com/rust-lang/chalk/pull/226#issuecomment-538509914" target="_blank" title="https://github.com/rust-lang/chalk/pull/226#issuecomment-538509914">comment</a></p>



<a name="177366162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177366162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177366162">(Oct 04 2019 at 18:25)</a>:</h4>
<p>gotcha, will go over them when i have time</p>



<a name="177378819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177378819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177378819">(Oct 04 2019 at 21:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> one additional thing, I want to make sure that my code here is correct: <a href="https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281" target="_blank" title="https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281">https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281</a></p>



<a name="177378934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177378934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177378934">(Oct 04 2019 at 21:04)</a>:</h4>
<p>this is not part of the clause "lowering" code i believe</p>



<a name="177378972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177378972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177378972">(Oct 04 2019 at 21:05)</a>:</h4>
<p>but is part of the <code>match_ty</code> function</p>



<a name="177379110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379110">(Oct 04 2019 at 21:07)</a>:</h4>
<p>actually, this commit would be the change that i'd like someone to review: <a href="https://github.com/rust-lang/chalk/pull/226/commits/0a53a25e5343f2982d9e988e8226aa081c41ca41" target="_blank" title="https://github.com/rust-lang/chalk/pull/226/commits/0a53a25e5343f2982d9e988e8226aa081c41ca41">https://github.com/rust-lang/chalk/pull/226/commits/0a53a25e5343f2982d9e988e8226aa081c41ca41</a></p>



<a name="177379374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379374">(Oct 04 2019 at 21:11)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> one additional thing, I want to make sure that my code here is correct: <a href="https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281" target="_blank" title="https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281">https://github.com/rust-lang/chalk/pull/226/files#diff-a66f74f4c8a6a7a1342ab7c62c3ae8a4R281</a></p>
</blockquote>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> that code is not <em>wrong</em> but also not <em>necessary</em>. The <code>match_ty</code> code is kind of poorly named, but it is only used for various 'internals' chalk goals like <code>IsLocal</code> and so forth, which will never be part of a <code>dyn</code> type. That said, if it were to be used from new places, then the code would be right I think, and those clauses will get screened out eventually.</p>



<a name="177379402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379402">(Oct 04 2019 at 21:11)</a>:</h4>
<p>It might be nice to remove it but instead to add an assertion or something that the clauses <em>aren't</em> relevant</p>



<a name="177379509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379509">(Oct 04 2019 at 21:12)</a>:</h4>
<p>hmm, so similar to another case  where it does nothing, or panicks</p>



<a name="177379528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379528">(Oct 04 2019 at 21:13)</a>:</h4>
<p>(at worst, a <code>debug_assertion!</code> could be used to instantiate the clauses but assert that <code>could_match</code> is false)</p>



<a name="177379541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379541">(Oct 04 2019 at 21:13)</a>:</h4>
<p>or maybe at best :)</p>



<a name="177379546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379546">(Oct 04 2019 at 21:13)</a>:</h4>
<p>that seems ok</p>



<a name="177379551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379551">(Oct 04 2019 at 21:13)</a>:</h4>
<p>I'd say <code>debug_assertion!</code> because it's non trivial in complexity</p>



<a name="177379632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379632">(Oct 04 2019 at 21:14)</a>:</h4>
<p>I guess that <code>match_ty</code> would need another argument, the <code>env_clause</code> we are trying to solve</p>



<a name="177379662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379662">(Oct 04 2019 at 21:14)</a>:</h4>
<p>or rather the <code>goal</code></p>



<a name="177379680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379680">(Oct 04 2019 at 21:14)</a>:</h4>
<p>then you'd do something like this</p>



<a name="177379733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177379733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177379733">(Oct 04 2019 at 21:15)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="n">debug_assert</span><span class="o">!</span><span class="p">(</span><span class="w"></span>
<span class="n">qwc</span><span class="w"></span>
<span class="w">  </span><span class="p">.</span><span class="n">substitute</span><span class="p">(</span><span class="o">&amp;</span><span class="p">[</span><span class="n">ty</span><span class="p">.</span><span class="n">clone</span><span class="p">().</span><span class="n">cast</span><span class="p">()])</span><span class="w"></span>
<span class="w">  </span><span class="p">.</span><span class="n">iter</span><span class="p">()</span><span class="w"></span>
<span class="w">  </span><span class="p">.</span><span class="n">all</span><span class="p">(</span><span class="o">|</span><span class="n">c</span><span class="o">|</span><span class="w"> </span><span class="o">!</span><span class="n">c</span><span class="p">.</span><span class="n">could_match</span><span class="p">(</span><span class="n">goal</span><span class="p">))</span><span class="w"></span>
<span class="p">);</span><span class="w"></span>
</pre></div>



<a name="177450682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177450682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177450682">(Oct 06 2019 at 08:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ok, i'm down to one last compile error, and it's in <code>unify.rs</code></p>



<a name="177450724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177450724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177450724">(Oct 06 2019 at 08:08)</a>:</h4>
<p>two cases are still missing from your comment: <code>(Ty::Apply, Ty::Dyn)</code> and <code>(Ty::Apply, Ty::Opaque)</code></p>



<a name="177450729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177450729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177450729">(Oct 06 2019 at 08:08)</a>:</h4>
<p>i'm not sure how i should unify these types with <code>Ty::Apply</code></p>



<a name="177541475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177541475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177541475">(Oct 07 2019 at 17:30)</a>:</h4>
<p>my guess is that since <code>Apply</code> is  about  type constructors,  it may just be sufficient if we can prove that the <code>Apply</code> type implements all of the traits that <code>Opaque</code>  requires?</p>



<a name="177541586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/177541586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#177541586">(Oct 07 2019 at 17:32)</a>:</h4>
<p>i would think that there shouldn't be any solution for unifying <code>Dyn</code>  and <code>Apply</code>, since <code>Dyn</code> specifically refers to a trait object, and no <code>Apply</code> type represents a trait object</p>



<a name="178086795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178086795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178086795">(Oct 14 2019 at 09:19)</a>:</h4>
<blockquote>
<p>i would think that there shouldn't be any solution for unifying <code>Dyn</code>  and <code>Apply</code>, since <code>Dyn</code> specifically refers to a trait object, and no <code>Apply</code> type represents a trait object</p>
</blockquote>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> sorry for not responding to these more promptly, I forgot I hadn't answered. I went ahead and pushed some commits to your branch to fix the unification cases.  This was correct.</p>



<a name="178086844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178086844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178086844">(Oct 14 2019 at 09:20)</a>:</h4>
<p>I also pushed a few minor fixes and the branch builds now!</p>



<a name="178086851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178086851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178086851">(Oct 14 2019 at 09:20)</a>:</h4>
<p>I was thinking that man we really need to get this code landed.</p>



<a name="178086857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178086857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178086857">(Oct 14 2019 at 09:20)</a>:</h4>
<p>(I was attempting some other refactorings and realized I would stomp all over your branch.)</p>



<a name="178087898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178087898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178087898">(Oct 14 2019 at 09:37)</a>:</h4>
<p>I was reading the diff and I would say at this point the main thing that's missing is tests -- although when I tried to add one, I immediately got some panics. =) I'm inclined to land the branch first and address adding tests and fixing bugs <em>next</em></p>



<a name="178092090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178092090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178092090">(Oct 14 2019 at 10:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> ok I merged the existing PR. I also created a list of some tests.</p>



<a name="178122334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178122334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178122334">(Oct 14 2019 at 17:34)</a>:</h4>
<p>what kind of tests do you have in mind?</p>



<a name="178151427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178151427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178151427">(Oct 15 2019 at 00:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> I added a list <a href="https://github.com/rust-lang/chalk/issues/218#issue-438505476" target="_blank" title="https://github.com/rust-lang/chalk/issues/218#issue-438505476">to the top of this issue</a> -- but let me make a branch with some examples</p>



<a name="178151617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178151617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178151617">(Oct 15 2019 at 00:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> a sample test (which fails) is on <a href="https://github.com/nikomatsakis/chalk-ndm/tree/dyn-trait-test" target="_blank" title="https://github.com/nikomatsakis/chalk-ndm/tree/dyn-trait-test">this branch</a> -- it panics in unification because we need to write a routine for unifying <code>QuantifiedWhereClauses</code></p>



<a name="178151619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178151619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178151619">(Oct 15 2019 at 00:52)</a>:</h4>
<p>similar I imagine to <code>unify_forall_tys</code></p>



<a name="178660831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178660831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178660831">(Oct 21 2019 at 14:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> did you see the above notes <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> ?</p>



<a name="178679400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178679400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178679400">(Oct 21 2019 at 17:45)</a>:</h4>
<p>sorry, i was busying with other stuff</p>



<a name="178679431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178679431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178679431">(Oct 21 2019 at 17:45)</a>:</h4>
<p>it does look like there's some work left on the implementation itself before it can properly be used</p>



<a name="178679524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/178679524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#178679524">(Oct 21 2019 at 17:46)</a>:</h4>
<p>i'm not 100% familiar with the macro syntax in your branch, but I can familiarize myself with it after some reading</p>



<a name="179675417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179675417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179675417">(Nov 01 2019 at 23:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ok so I was able to look further into this last night, and the problem that i think i'm encountering right now is the elimination of the 2 binders on the Opaque/Dyn types</p>



<a name="179675509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179675509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179675509">(Nov 02 2019 at 00:00)</a>:</h4>
<p>i currently made it so that the code checks for arity of the outer binder, ensuring that it is 1 (which represents the self-type)</p>



<a name="179675514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179675514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179675514">(Nov 02 2019 at 00:00)</a>:</h4>
<p>and if not, panic with an error message</p>



<a name="179675661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179675661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179675661">(Nov 02 2019 at 00:05)</a>:</h4>
<p>then i create a new universe and construct two placeholder types, and substitute them into both arguments that gets passed in, which removes the outer binder</p>



<a name="179675671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179675671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179675671">(Nov 02 2019 at 00:05)</a>:</h4>
<p>i have doubts on whether this is the correct  approach, because I felt like i should've created two new variables on the universe instead of creating placeholder types</p>



<a name="179863604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179863604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179863604">(Nov 04 2019 at 19:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> hmm so good questions :) let me circle back to you on this</p>



<a name="179878979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179878979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179878979">(Nov 04 2019 at 21:33)</a>:</h4>
<p>OK so <span class="user-mention" data-user-id="116108">@Keith Yeung</span> we have to equate the <code>dyn</code> and <code>impl</code> types...</p>



<a name="179879011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179879011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179879011">(Nov 04 2019 at 21:34)</a>:</h4>
<p>I think that in the <em>particular case</em> of the <code>Self</code> binder</p>



<a name="179879052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179879052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179879052">(Nov 04 2019 at 21:34)</a>:</h4>
<p>we can take a simpler approach</p>



<a name="179879083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179879083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179879083">(Nov 04 2019 at 21:34)</a>:</h4>
<p>precisely because we know there is exactly one parameter</p>



<a name="179883112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179883112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179883112">(Nov 04 2019 at 22:18)</a>:</h4>
<p>oh, huh.</p>



<a name="179883150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179883150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179883150">(Nov 04 2019 at 22:19)</a>:</h4>
<p>reading the existing unification logic...I ... feel like there is a bug here</p>



<a name="179883304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179883304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179883304">(Nov 04 2019 at 22:20)</a>:</h4>
<p>...yep...</p>



<a name="179884395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/179884395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#179884395">(Nov 04 2019 at 22:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> I wrote up in detail what needs to be done as <a href="https://github.com/rust-lang-nursery/chalk/issues/275" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/275">chalk#275</a></p>



<a name="180458987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/180458987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#180458987">(Nov 11 2019 at 20:53)</a>:</h4>
<p>btw <span class="user-mention" data-user-id="116108">@Keith Yeung</span> -- have you had a chance to take a look at this? if not, I might take a swing at it later on</p>



<a name="180459041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/180459041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#180459041">(Nov 11 2019 at 20:54)</a>:</h4>
<p>not really, i've only looked briefly  at the issue</p>



<a name="180459046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/dyn%20and%20impl%20trait%20support%20chalk%23218/near/180459046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/dyn.20and.20impl.20trait.20support.20chalk.23218.html#180459046">(Nov 11 2019 at 20:54)</a>:</h4>
<p>not so much into the code</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>